Various fixes to try to make the ui more solid.