fixed errors on trigger in MySQL