fix a bug in which an invalid key of a set was sent to the client