take_n_from merge_key fix