Fixing next checkpoint detection
Fixing previous cycle  detection