Bugfixes to gui