Fixed synchronization bug