Fixed check trigger. Added a trigger for updates too.