small fix in function <generateCoords>