Fix freeing children and add 0x to hex output.