Bug corrected in model.cpp and model_omp.cpp