Fixed runCommand to not be sketchy.