to_json bug for group attributes