Made a few changes to how folder opened and to place where we replace the tags in the data string.