only use plugin phase in one place
fix some error messages