Small changes to run()