Sometimes index returns empty string instead zero value

Trying to solve issue #1460