fix coordinate bug