bug with restore texture