FIX: Bug in market total calculations