Pulled code from BugSnag4MC