finalize module based on the merged status
finalize module based on the merged status