PATCH for datbase.c