Connection bugfix