Fixed error in db