fix client pos in routes function