fixed parallel bug, still need more testing