fixed wait for connect in tests