fixed util.py from rebase