bug fix when view.sel is empty