fix to work with SSL URLs