Fixed a couple of bugs in run command