fixed 2040 patch after upstream commit