Fix remaining merge code