This article applies to ebikes that use the "silverfish battery rail system":

DJ City Bike

DJ Folding Bike

DJ Folding Bike Step Thru

DJ Mountain Bike

Your bike will likely experience intermittent electrical cutout when riding on bumpy or irregular surfaces. A symptom of this is that the battery won't fully insert in the rail, leaving a gap that can be 1/8" (3.5mm) wide:

When you remove the battery, note where the lower end of the battery rail is in relation to the battery socket base. The rail is intended to insert into a slot in the base:

The fix? Loosen the upper mounting bolt on the end of the battery rail, align the lower end of the rail with the mounting slot:

Press down on the rail, fully seating it to the bottom of the battery socket mounting slot:

Put a dab of blue Loctite on the end of the upper mounting screw:

Use a stubby Philips driver to firmly fasten it to the seatstay bridge:

There's also a video of this procedure:

How to properly position the battery rail (solves intermittent power cut with silverfish battery) (1:22)