Fix for wraparound graphics