Fixed socket leaking.