fix powerset indexing error