Adding sync to fix bug in testing