Fixed bugs from the condor running