Added update triggers

Added update triggers, soehow created more bugs that need to be fixed.
Such is life.