avoid texture drawing errors