Fix environment settings