fix subset indexing