fix bug for form type