Fixing DB implementation.