has_index fix