Fix Rewrite of Cats/Event Relations Cleanup function