bugfixes to the alert scripts