Fixed patches after upstream commits