Fix bug in generation of index row key