Fix environment script