Added synchronized keywork to prevent concurrent modification of lock manager.