fix a bug that caused std::hex to get written into std::cerr

reported by gfgtdf