Fixed edge case exception.
Merge remote-tracking branch 'origin/feat/omp-speedups' into develop