Bug fixes and code touchups to checkpoint