Apply @authmillenon's patch