Cleaned up the "no multiple alerts" system

The "no multiple alerts" system had a little bug apparently and didn't deliver any alert in certain circumstances. Cleaning up a bit the code seems to have fixed it (although I don't know how).