Fix let scope leakage bug