Some changes to make UI behave nicer