My 2.5 surges then stalls
I bought this Rio Grande 5spd which hadn't run in about 2 years. It would crank but not start or sputter. I replaced the crank sensor and it fired up. The idle is usually a little rough but consistent (about 800 rpm), but sometimes if I rev it up just a bit, it will surge higher to about 1800 and stall. I drove it a bit and when I came to a stop, the rpm's surged to 2k and stayed a while before coming down. This is an intermittent issue.
The only code present is 12 (disconnected battery) and 33 (N/A because no A/C). The fuel supply line is leaking where it connects to the metal line near the fuel tank- I'm not sure if how that relates to the surging/stalling issue. I plan on replacing the line today. It still has the old fuel, so I don't know if that could cause the problem. I'm at a loss here, any help would be greatly appreciated.