Fixed debpopup plugin, added template.afterRender