some small fixes to parallel code