Managed some sync issues

fixed potential errors when adding records