Fix loop to make it work for non "*00" sections (e.g. d101, d110, g001)