fix backspace handling and a bug in insertLine