Fixed socket disconnection crash