Revert "unlock if not empty"

This reverts commit 7008ab6982d0038024bdb9ec633c56a224e55623.