diff --git a/include/ftl/codec/msgpack.hpp b/include/ftl/codec/msgpack.hpp
index 4f8eba90a3b1b252b5ea2f447b3a59a73b823451..b211b0d777de8a33cd86ac072d0f7fb68a1ad2f8 100644
--- a/include/ftl/codec/msgpack.hpp
+++ b/include/ftl/codec/msgpack.hpp
@@ -6,7 +6,9 @@
 
 template <typename T>
 void ftl::codec::pack(const T &v, std::vector<uint8_t> &out) {
-    out.resize(0);
+    // Note: The following breaks in gcc 11 and 12.
+    //out.resize(0);
+    //out.reserve(1024);
     ftl::util::FTLVectorBuffer buf(out);
     msgpack::pack(buf, v);
 }
diff --git a/src/streams/muxer.cpp b/src/streams/muxer.cpp
index b0f6b57f4db12bb13225348a3f0b54333ed605c5..a5b425e235b9b5df4ba59634f456e19a993abbbd 100644
--- a/src/streams/muxer.cpp
+++ b/src/streams/muxer.cpp
@@ -22,6 +22,7 @@ Muxer::~Muxer() {
         se.handle.cancel();
         se.req_handle.cancel();
         se.avail_handle.cancel();
+        se.err_handle.cancel();
     }
 }
 
diff --git a/src/uri.cpp b/src/uri.cpp
index a0310b8dbeb321101b7846be3d2e612f613d97d2..7bb463bc90dcf3fa98cd5833ab0d02198dc39ba1 100644
--- a/src/uri.cpp
+++ b/src/uri.cpp
@@ -38,7 +38,7 @@ static const std::unordered_map<std::string, ftl::URI::scheme_t> schemeMap = {
     {"device", URI::SCHEME_DEVICE},
     {"file", URI::SCHEME_FILE},
     {"group", URI::SCHEME_GROUP},
-    {"beyond", URI::SCHEME_TCP},
+    {"beyond", URI::SCHEME_BEYOND},
     {"mux", URI::SCHEME_MUX},
     {"mirror", URI::SCHEME_MIRROR},
     {"cast", URI::SCHEME_CAST}
@@ -136,7 +136,7 @@ void URI::_parse(uri_t puri) {
 
         std::string porttext = std::string(uri.portText.first, uri.portText.afterLast - uri.portText.first);
         try {
-            m_port = std::stoi(porttext);
+            m_port = (porttext.size() > 0) ? std::stoi(porttext) : 0;
             if (m_port < 0 || m_port >= 65535) {
                 throw FTL_Error("Port out of range");
             }