First thing you should do is pull your battery cables off and add a star washer to each side. When you put the cables back on make sure to tighten then fairly snug with a wrench.
Charging, starting and other various electrical gremlins are fairly common with the X bikes and this fix normally straightens them out.
Retired USAF, IYAAYAS!
2008 V-Star 1100 Custom Bobber project
2011 Crimson XR with Forged Highway Bars / Hard Bags / Passenger Backrest, Ness parts including Smooth Layback Plate Frame/Mount / Rad 3 Mirror / deep cut grips / drivers floorboards /shifter peg / brake peg / passenger pegs. Witchdoctor black rack, Lloydz filter / timing wheel / VFC III, 7Jurock windshield, Drag Specialties seat.