also improve debug output, it was a little nonsensical previously (some bit rot on meaning of fields)