Fix edge_case for #keys