Fixed grouping key in the presence of non-strings, fixed facttable-for-r...

...eport when giving AID