Fix crash on rotate in offline mode