fixed errors and made texture usable again