Database model fix