fix double-alerts bug