fix bug of possibly not removing some locks