fixed interleaving bug