Fix db ref