Fix routing bugs