fix some client side routing bugs