fix texture converting crash