fixes image repeat bug