fixed a minor bug in the alarm