diff --git a/src/main/java/org/jfrog/hudson/release/ReleaseAction.java b/src/main/java/org/jfrog/hudson/release/ReleaseAction.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jfrog/hudson/release/ReleaseAction.java
+++ b/src/main/java/org/jfrog/hudson/release/ReleaseAction.java
@@ -349,10 +349,10 @@ public abstract class ReleaseAction<P extends AbstractProject & BuildableItemWit
                 createReleaseBranch = true;
                 if (req.getParameter("releaseBranch") != null) {
                     releaseBranch = req.getParameter("releaseBranch");
-                } else {
-                    createReleaseBranch = false;
-                    releaseBranch = null;
                 }
+            } else {
+                createReleaseBranch = false;
+                releaseBranch = null;
             }
         }
HAP-<I> - Create a REST api in Jenkins plugin for Release Staging