fixed a bug which overwrites incorrect env when processing let