backbort changes into the shared code that won't make it through rebasing