Fixes bug in nightly processing code.