Fixed minor bug in util.js