Add missing code from f992b02