fixed few bugs with the GUI