Fix problem with HTTP redirect