fix database.insert