Corrected DB code