Simplify logic in call_command()