infinite loop in trigger updating