fixed consistency issue in set.