Fixed synchronization of local variables with local storage