Synchronization while removing handler.