changed how some exceptions were handled by sockets