Got the portrait mode working ok now.