fix bug on form.template
new test for controller's add function