fix grid loading and indexes