Fix database problem