fixed the coordinate bug