Fixed syncing problem with empty Database