fix #10399: correctly calculate row and column for wells
Merge pull request #830 from mtbc/trac-10399-dev

fix #10399: correctly calculate row and column for wells (rebase)