solved a few bugs with the gui