fixing DB reference