Fix environment init