As i suspected, you have to initialize your shift register, but if you don't want to reinitialize it everytime, you can place a shift register in the outer loop, initialize it with a empty string, pass this shift to the inner one, and take the string indicator to the outer loop. This way, it will be initialized when program is.
Hope this helps