transport: fix readyState bug