fix to handle redirects, #129