Fixing how alerts are sent