I had an issue on my xs where the rectifier failed and it meant a total loss of engine while the lights were on, Might be worth checking if it's still functional, also the coils can be iffy if it was stored in the damp, mine had to get 2 new coils when I got it, coil fail symptom is that there's no power after the engine warms up, best future advice is watch the timing, timing is very easy to slip on these bikes, not difficult to reset though.