Changed "if" to "else if" in Utils.java