Fixes for env