diff --git a/src/org/openbravo/erpCommon/ad_process/ApplyModules.java b/src/org/openbravo/erpCommon/ad_process/ApplyModules.java
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModules.java
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModules.java
@@ -371,7 +371,7 @@
           + build.getMainSteps().get(0).getCode() + "'");
       ps2.executeUpdate();
       // We also cancel sessions opened for users different from the current one
-      updateSession = getPreparedStatement("UPDATE AD_SESSION SET SESSION_ACTIVE='N' WHERE CREATEDBY<>?");
+      updateSession = getPreparedStatement("UPDATE AD_SESSION SET SESSION_ACTIVE='N' WHERE SESSION_ACTIVE<>'N' AND CREATEDBY<>?");
       updateSession.setString(1, currentUser.getId());
       updateSession.executeUpdate();
 
