fix synchronization and remove slow down found using visualvm profiling