Fix database in tests