fixed bugs with textures overlapping a few pixels