Updated to reflect upstream API changes.