Fixed alarm bug