fixed error in prerun code