Fixed a bug preventing connecting 2 times