Fixed CancelRun from causing pipeline exceptions

NextEpoch and CancelRun should not directly set the CurrentEpoch. The pipeline needs to be purged before the CurrentEpoch is set.