Fix email notification bug.