rectangles intersection bug fixed