I am afraid to say what you are using is a poor barcode generation, you may change one with well-tested barcode library.