fixed buffer, openmp should work properly now in parallel mode.