Fixed bug that affected codes ending with W and Z. Improved robustness by allowing codes with lowercase letters