Fixed bug when pressing backspace

when pressing backspace and there is a mention ahead, bad things could happen