Fix db retention