Add license and fix the auto-sync problem