improvements and bug fixes on ngsync