fix problem with circular JSON