Actually commit the related code changes from 3c7fbea