Fixed crash on display rotation