Bug fix and support one-way sync and ssl