The problem is while reloading, if the previous content is not destroyed, while trying create new one, it will give duplicate id error as you cannot have 2 UI with same id.
Please just check in debugging mode. This is just my guess for your error. We can confirm once you see it by debugging.
With Regards,
Ramesh Shrestha