bugfix for reconnect