cleanup before rebasing