fix the issue of calling ridToCordinates in wrong param. order