Fix indexing on import