fixed a few routing bugs