Fix texture unit overflow