Adjust for latest api changes