Script changes to fix bug stopping triggers from working