Solve the problem that the trigger was crashing the database.

And note down next steps.