fix redirects in backend