Fixed removal of temporary tags