Add tests for the wrong number of hex digits and fix