Almost working checkpoint