Fixed alert calculation