fixed faulty sorting of checkpoints