Polaris Scrambler start/shut off issues

Hi everyone I have an 01 Scrambler 500. It has been having issues starting and shutting off. Currently when I shut it off I have to turn my key back a little more than half way, hold it there until it shuts off completely. If I turn it back entirely the ATV will stay running. The starter looks good, I have taken it apart cleaned it, changed the ignition switch, and put in a new battery. It worked for a while but stopped starting eventually and turning off completely which ruined the new battery. Anyone know what it could be?