new default env feature and fixing bug with env loading