Fixing environment passing to child instance