Fixed insert-triggers function