Updated to match changes in upstream.