Fixed missing code in lock command.