Fix debug alert bug