added prefix (%#x) to kvsprintf