fixed some routing bugs