Stop crashing when generating the related objects error message