fixed small bug with synchronization