Add barrier to avoid compiler reorder.