Fixed rotation crash on the main activity.