tidy up before merging