Fix logic error in register_transport