fix fail logic in allowcommand