fixed mouse press selection code