Fixed bug with alarm not setting properly