Fix some bugs with the way Gui's work.