Little bugfixes in Utils.java