correcting a few bugs, leaving debug output to debug a bit more