Here is an updated version of your page built with the extensions without hand coding to show you what I was referring to.
What duplicated results are you getting? The fmid shouldn't be duplicated, is it? I'm not sure why it wasn't working properly. It appeared to me that it should have been working as you had it, but look at the page I have attached and provide more detail about what is being repeated that shouldn't be. Maybe include a URL where I can see the problem so I can understand it better.