Fix in database code