fix coordinate retrieval