fixed a small bug with alarms