Fixed the error alerts