fix std::hex and use std::dec. And fix placement of return in myfree.