fix a bug for set