Fixed a fatal error when using the `--repeat` switch.