Fixing bug with jsdom patching.