FIX indexing bug