Improved alerts handling