Fix "keys" exception on blank record