fixed NullPointerException cause by no alarm being set