Fix ref counting in ws_set_get()