added support for unlimited ranks in config.