Fix one of the cyclomatic complexity warnings