small fix to sum threads functs