Fixed issue with odd number of valid characters