Fix the null pointer exception on the start of the alarm service