moved listener close to first connection confirm