A couple of fixes so jumping from the end and middle of a line works