Fix the layout issues when rotating to landscape