prevent json recursion error when using groups