alarm bug fixes

and restoring some broken tests.