fixed too many redirects