Client gets disconnected when connecting through internet
fixes #305