Merge pull request #5628 from saurabh6790/patch_fixes

[minor][fix] reload warehouse before executing patches