bugfixes to parallel version