Fix bug with shutdown(). Remove util dependency.