Bugfixes and improvements to alert handling code