fix error reporting for texture images