try to get https URLs right