fix bug: timeout after call cancel is not work properly