bug revert - lock and unlock