Fix the redirect to root bug