Added check for inside ellipse