Small fixes to alert script