correction of bugs in alarm.

Signed-off-by: ETFernandes <eduardotf93@gmail.com>