finally fixed the database