select mouseup fix and related changes