Fix a bug, add some (commented-out) debug info.