Added removing of not needed active rectangles