Fix email notification errors