fix the condition for existence of commands.