fixed one bug in sync func call