Fix hex being shown instead of text

* Simplified the code a little bit, seems to be working now