PatchModule crash fixed in some situations