fixed the layout and orientation changes