Improve parent handling.