fix inserted elements