Fix some UDP bugs.