Fixed layout bug in portrait mode.