clean up to match what I did in the upstream branch