fixing id problem with flipflops