fixed bug in run_command