Fixed code for detection of checkpoint to align saves.