fixed bug that added the same texture infinitely