GDS-1261: undo pull request and fix the issue another way.