Fixed patches after upstream commit