Fix issue with monkey patching