Fixed the checkpoint problem