TypeError: Converting circular structure to JSON --> starting at object with constructor 'global' --- property 'global' closes the circle