Fixed vanishing curve problem where it meets corner of bounding box