Add a debug printout, fix a crash on kc++