Applying afe7710858e4ce28bb60f6ae6e167a18d687634f.patch to master branch
include missing files from patch