The problem is that the server response time may vary and sometimes the previous request arrives after the latest and affects the state. The problem is easy to solve with