update nested_form.js and fix bug with content not being parsed correctly before insertBefore