bugfixes to make UDP work;
TODO: transfer logs