Fix for http => https redirect cases that failed.