First version of db fix for img.