fix trigger removal bug