bug fixes in form data set construction