fixed bug in initParallel