fixed an erro on alarms