Some fixes to the texture importer