fix intersection.rectangle_rectangle
fix transitions
fix tests