handle selections better and set cursors