Fix checkpoint upgrade script