It seem the issue is that the reading of the value occurs before the change has been propagated to the server, waiting a bit will solve the issue