config: replace open-coded cfg.get[int]