Fix rotation crashes