fixing bug where form submission was not properly scoped