Fixed duplicate script elements in views because they are in the template