Fixes for environment configuration