fix a bug in training function with dual coordinate descent, parallelization is working now