bug fixes to alarms