fix swapped textures at tile edges