Fixing various stuff for th GUI