Original patch as attached on the bugreport