fix database was local bug