Fix segfault that occurs (seemingly randomly) when doing constant changes to the alarms model
Segfaults seem to have a chance of occurring when editing the alarms list (creating, editing and deleting all seem to cause it).
I have not been able to pinpoint the cause yet.