Fix atlas merging.