Added logic for sets of 0 elements