Now, most would just tell you to toss the charger. But as a backup or if you can't find a charger you fancy in the meantime, what MAY solve the "sometimes charging, sometimes not charging" problem is to observe the charge lights when you place the batteries. You'll find that if the battery's positive pole makes contact at certain positions, it will charge without any issue. It's not that the contacts on the charger are dirty. I would need to dismantle the whole charger to try to pinpoint the problem, which I'm too lazy to do on my nitecore which has the same problem.
So all you have to do would be to place a shim to ensure that the batteries make contact at that sweet spot each time you place it into the charger.
This is just my experience. It may or may not solve the problem with your charger.