fix syntax err in sync fn