fix bugs on util.c
Merge branch 'brownyoda' into cevans