Fix bug with disabling alarm