Reset alarms on startup, fix bug