Fix variable mixup:
- Caused an NPE in the unit tests.