Fixing alert bug