bug fixes on alarm