Related to 17b665d5:  add 'sync' in various places to kill race

Take out 'sleep' from 17b665d5 to increase race likelihood