fix bug with rectangle equals