Fixes issue where exports doesn't run query.