Fix two bugs in the BasicPrivateCommand handler (bad regex and use of an undefined variable).