Fixed dangerous flaw in server loop on bad connection