Fix the not redirect to root bug