Fix db methods