fix the screen rotation crash