fix ssl redirect issue