Fixing js assignation when render a template.