improve ucfirst support in router resolving