bind -remove unsed functions and fix sync code for automatic option.