Fixed indexing on resources in comparments