93 Legacy 2.2L. Vehicle was running just fine before the battery died. Replaced battery with same type of battery. Now the engine stalls when coming to a stop. When I start it back up the idle speed fluctuates from 400 to 800 rpm and then settles down to 700rpm. Car will drive and idle just fine until I shut the engine off. When restarting it idles fine until the next time I come to a stop and then it dies. Any ideas?