refined sync and fix metadata import