sync function sequence fix