fix for mock patching