Fixed no-sync-db crash