Fix display of offline rectangle after an orientation change