Fix handling of set_shard events