cleanup before merging