clean up locking