Fix bug; add hexify helpers