solved intersection bug