Fix to parallel implementation