Fix email variables (close #569)