Fixed bug with class declaration on alert