Fixing alert problem