fixed some env problems