bug fixing

disabled and enabling texture didn't work correctly.