diff --git a/bundles/org.openhab.binding.serialbutton/src/main/java/org/openhab/binding/serialbutton/internal/handler/SerialButtonHandler.java b/bundles/org.openhab.binding.serialbutton/src/main/java/org/openhab/binding/serialbutton/internal/handler/SerialButtonHandler.java
index 25999161ec9e7..b11d6a6c8b021 100644
--- a/bundles/org.openhab.binding.serialbutton/src/main/java/org/openhab/binding/serialbutton/internal/handler/SerialButtonHandler.java
+++ b/bundles/org.openhab.binding.serialbutton/src/main/java/org/openhab/binding/serialbutton/internal/handler/SerialButtonHandler.java
@@ -16,7 +16,6 @@
 import java.io.InputStream;
 import java.util.TooManyListenersException;
 
-import org.apache.commons.io.IOUtils;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.smarthome.core.thing.ChannelUID;
 import org.eclipse.smarthome.core.thing.CommonTriggerEvents;
@@ -93,10 +92,21 @@ public void initialize() {
 
     @Override
     public void dispose() {
+        if (serialPort != null) {
+            serialPort.removeEventListener();
+        }
+        if (inputStream != null) {
+            try {
+                inputStream.close();
+            } catch (IOException e) {
+                logger.debug("Error while closing the input stream: {}", e.getMessage());
+            }
+        }
         if (serialPort != null) {
             serialPort.close();
         }
-        IOUtils.closeQuietly(inputStream);
+        inputStream = null;
+        serialPort = null;
     }
 
     @Override