Fix a couple issues with the prepare_command script