Fixed the shutdown of sync client.