patch from issue 50240043