fixed transformation error with selected rect segments