diff --git a/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/Network.kt b/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/Network.kt
index 25099393f3b4213e0a930a4518d797c060c8f835..6368f37264851258e892ffc8e4f621507682102f 100644
--- a/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/Network.kt
+++ b/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/Network.kt
@@ -449,10 +449,10 @@ class Network constructor(
     _networkName = networkName
   }
 
-  override fun setCurrentServer(currentServer: String) {
+  override fun setCurrentServer(currentServer: String?) {
     if (_currentServer == currentServer)
       return
-    _currentServer = currentServer
+    _currentServer = currentServer ?: ""
   }
 
   override fun setConnected(isConnected: Boolean) {
@@ -461,7 +461,7 @@ class Network constructor(
     _connected = isConnected
     if (!isConnected) {
       setMyNick("")
-      setCurrentServer("")
+      setCurrentServer(null)
       removeChansAndUsers()
     }
   }
@@ -473,10 +473,10 @@ class Network constructor(
     live_connectionState.onNext(_connectionState)
   }
 
-  override fun setMyNick(myNick: String) {
-    if (_myNick == myNick)
+  override fun setMyNick(myNick: String?) {
+    if (_myNick == myNick ?: "")
       return
-    _myNick = myNick
+    _myNick = myNick ?: ""
     if (_myNick.isEmpty() && ircUser(myNick()) == null) {
       newIrcUser(myNick())
     }
@@ -614,19 +614,19 @@ class Network constructor(
     _unlimitedMessageRate = unlimitedMessageRate
   }
 
-  override fun setCodecForDecoding(codecForDecoding: ByteBuffer) {
-    setCodecForDecoding(Charsets.ISO_8859_1.decode(codecForDecoding).toString())
+  override fun setCodecForDecoding(codecForDecoding: ByteBuffer?) {
+    setCodecForDecoding(codecForDecoding?.let(Charsets.ISO_8859_1::decode)?.toString() ?: "")
   }
 
-  override fun setCodecForEncoding(codecForEncoding: ByteBuffer) {
-    setCodecForEncoding(Charsets.ISO_8859_1.decode(codecForEncoding).toString())
+  override fun setCodecForEncoding(codecForEncoding: ByteBuffer?) {
+    setCodecForEncoding(codecForEncoding?.let(Charsets.ISO_8859_1::decode)?.toString() ?: "")
   }
 
-  override fun setCodecForServer(codecForServer: ByteBuffer) {
-    setCodecForServer(Charsets.ISO_8859_1.decode(codecForServer).toString())
+  override fun setCodecForServer(codecForServer: ByteBuffer?) {
+    setCodecForServer(codecForServer?.let(Charsets.ISO_8859_1::decode)?.toString() ?: "")
   }
 
-  override fun addSupport(param: String, value: String) {
+  override fun addSupport(param: String, value: String?) {
     _supports[param] = value
   }
 
@@ -636,7 +636,7 @@ class Network constructor(
     _supports.remove(param)
   }
 
-  override fun addCap(capability: String, value: String) {
+  override fun addCap(capability: String, value: String?) {
     _caps[capability.lowercase(Locale.ROOT)] = value
   }
 
diff --git a/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/interfaces/INetwork.kt b/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/interfaces/INetwork.kt
index fbc92fe92758ae63e0e1988ad8fd58ca233feb9c..ee24a0213adae4e962f307cd5f9c6b7076ed7ac9 100644
--- a/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/interfaces/INetwork.kt
+++ b/lib/src/main/java/de/kuschku/libquassel/quassel/syncables/interfaces/INetwork.kt
@@ -67,7 +67,7 @@ interface INetwork : ISyncableObject {
   }
 
   @SyncedCall(target = ProtocolSide.CLIENT)
-  fun setCurrentServer(currentServer: String) {
+  fun setCurrentServer(currentServer: String?) {
     sync(
       target = ProtocolSide.CLIENT,
       "setCurrentServer",
@@ -76,7 +76,7 @@ interface INetwork : ISyncableObject {
   }
 
   @SyncedCall(target = ProtocolSide.CLIENT)
-  fun setMyNick(myNick: String) {
+  fun setMyNick(myNick: String?) {
     sync(
       target = ProtocolSide.CLIENT,
       "setMyNick",
@@ -94,7 +94,7 @@ interface INetwork : ISyncableObject {
   }
 
   @SyncedCall(target = ProtocolSide.CLIENT)
-  fun setCodecForServer(codecForServer: ByteBuffer) {
+  fun setCodecForServer(codecForServer: ByteBuffer?) {
     sync(
       target = ProtocolSide.CLIENT,
       "setCodecForServer",
@@ -103,7 +103,7 @@ interface INetwork : ISyncableObject {
   }
 
   @SyncedCall(target = ProtocolSide.CLIENT)
-  fun setCodecForEncoding(codecForEncoding: ByteBuffer) {
+  fun setCodecForEncoding(codecForEncoding: ByteBuffer?) {
     sync(
       target = ProtocolSide.CLIENT,
       "setCodecForEncoding",
@@ -112,7 +112,7 @@ interface INetwork : ISyncableObject {
   }
 
   @SyncedCall(target = ProtocolSide.CLIENT)
-  fun setCodecForDecoding(codecForDecoding: ByteBuffer) {
+  fun setCodecForDecoding(codecForDecoding: ByteBuffer?) {
     sync(
       target = ProtocolSide.CLIENT,
       "setCodecForDecoding",
@@ -323,7 +323,7 @@ interface INetwork : ISyncableObject {
   }
 
   @SyncedCall(target = ProtocolSide.CLIENT)
-  fun addSupport(param: String, value: String = "") {
+  fun addSupport(param: String, value: String? = null) {
     sync(
       target = ProtocolSide.CLIENT,
       "addSupport",
@@ -342,7 +342,7 @@ interface INetwork : ISyncableObject {
   }
 
   @SyncedCall(target = ProtocolSide.CLIENT)
-  fun addCap(capability: String, value: String = "") {
+  fun addCap(capability: String, value: String? = null) {
     sync(
       target = ProtocolSide.CLIENT,
       "addCap",