bug in index_of