Set environment variables properly