UI now functions properly for orientation change