Fixed missing code in lock command

Manged to break sending the passcode to the server while "improving" validations. Should be fixed now.

@pdehaan @jrconlin r?