Bug fixes for redirects.