decode_hex: move scope of decoder inside main loop so it gets cleared.