improved synchronization handling