Correctly extracts texture name in all cases now.