rectangle selection fix