Changed around UDP code