fix bug with listener where it force closed when disconnecting before the service was started