Fix for issue #390

I've added a flag so the proxy settings are only used where we want them.