correcting env handling logic in eval.c