Added missing build dependency to control file and fixed connection handling in gui.