Make sure gotoLine works when changing session