catching circular references when stringifying objects, fixes #4