fixed a bug in mail notification sched