Solved bug in parallelized mode for MATLAB >= R2012a