Modified Util.java to fix bug