How to fix the trigger errors