fixed an error in db