bug fix in router metaclass