fix coordinate errors