Changes for handling redirects.