get wid before decoding to prevent conflict for multi-threading