Fix system alarm error codes

The way the error codes were checking to only set on toggle could prevent the 
alarms ever being set in the first place.