Fixed crash after rotate screen.