Fix a few minore bugs in Form-builder-new js file.