fix infinit loop related to renaming tmpbndtype.