fixes to make texcoords work on Mac