fix email script