fixed bug in partions iterator if no element is in the set