parallel for all, bug fix