simplify debug output for kStd
some library backports from 4-0-0