bugfix

in order to get an alarm ID it has to be written first.