manually add changes detailed in #4248