Fixed bug that causes no alerts to be displayed by default

`$alerts` is always set to an empty array in the class definition.