bug fixes for alarms