fixed a bug on UDP