fix generation of func_key queue