Embedded form is not working properly