remove debug output and fix a bug in multiline mode