Made eval_pipe fix environments on error and propagate the error.