Fix missing use of .index()