Charging issues; stator wire grounded through junction box
I am having some charging issues with my bike. I have a known good stator and r/r becuase of some tests that I ran recently. I found out that the one stator wire that splices off and goes to the junction box is grounded to the frame. It is only this one wire of the three that is grounded through the junction box. I was wondering if this was supposed to be grounded or not? I am pretty positive that it shouldn't be. I disconnected the plug that goes to the junction box and retested the stator wire for continuity to ground and found that with it unplugged , there is no continuity to ground. This leads me to believe there it is grounded in or after the connection at the junction box. Are there any tests I can do to see if my junction box is ok? And how can the stator wire be grounded through the junction box? I have read that it could be the headlight relay. Could this be the case?