fixed bug

Bug made it send emails during the day but not sound the alarm.