Fix bug in util