Fixed the way the hex digits are generated