hacked libraries to avoid affecting global window context.