Fix export results method.

Some variables were misnamed.