Rectangle intersection fix