fixed bug with patching for offline