Fix email script