found bug in index key encoding