fix custom kv issue