Sometimes index returns empty string instead zero value

Signed-off-by: Michael Granados <michaelgranados@gmail.com>
Merge pull request #1465 from dgmike/issue-1460

Sometimes index returns empty string instead zero value