Fix texture parsing