fixed a bug related to parallel processing