fix error in trigger