Updated texture rendering to be less error prone.