Merge pull request #5699 from nabinhait/patch_fixes

Changed patch order to fix old patches