fixes color flips during merging, fixes martinsch/pgmlink#17