fix background flickering