bug fix causing reconnect not to work