diff --git a/src/java/azkaban/utils/Utils.java b/src/java/azkaban/utils/Utils.java
index <HASH>..<HASH> 100644
--- a/src/java/azkaban/utils/Utils.java
+++ b/src/java/azkaban/utils/Utils.java
@@ -368,8 +368,7 @@ public class Utils {
 		if (period.get(DurationFieldType.years()) > 0) {
 			int years = period.get(DurationFieldType.years());
 			periodStr = years + "y";
-		}
-		if (period.get(DurationFieldType.months()) > 0) {
+		} else if (period.get(DurationFieldType.months()) > 0) {
 			int months = period.get(DurationFieldType.months());
 			periodStr = months + "M";
 		} else if (period.get(DurationFieldType.weeks()) > 0) {
Changed "if" to "else if" in Utils.java