Fix bug when save component attributes to local after create a new component