minor bug with calculation of the coordinates

not resolved yet