using demonitor(Ref, [flush]) instead of demonitor(Ref)