fixed status code error with redirects