Fixing deprecated DB call