fixed error when saving a form with no model