Fixed minor mistake in the cleanup code of the UDP backend