fix recursive redirect