fix the x value,but still cannot handle the crossing