minor bugfix for re-connection