Resolve a bug with env directory