fix bug when save components