Making triggers behave better