Too many update calls and fix trigger xml