fix tohex (0-15)

spotted by @essen on IRC