fix a bug that trigger twice