reordered monkey.patch_all to prevent error