fixed a bug in `map` for sets