I had this problem for a while every time I had a flat on my 2010 torker graduate. It is an iterative process and works best if you get everything lined up in second and then go through all the gears and back to second, check the adjustment and go through the gears again until the pin is a bit off. this may take up to 5 or 6 times to get it to shift right while on the bike. After about two years it became much easier to adjust. I have been putting a bit of chain oil on the pin when I lube. Dont know if this has helped or not.
Good luck.