fix fatal errors on trigger execution