cleanup before checkout