fix issue 4: selection cleared after scrolling