Fixed some mistakes with merging.