Fix python3 compatibility on utils module.