fixed buggy sync (again and again and again...)
database auto-cleaning for tests