Fixed a few bugs in GUI.