Bug fix for redirecting to root path