Fix the problem of updating type field