table metrics calculate error fixed