Minor bug fixes on change of device orientation