Fixed the run routine