totals error fix