Updated for upstream 0.8.22 version