Fix server connecting twice