added slightly more elaborated texture check