Fix mathtools rectangle collision.