I don't like having transport specific hacks here, there must be some better way to do this