Fix bug for updating alarm