Fixed logic for write lock breaking