Add some missing cleanup in buidling the merge modules