small bugfix in indexing