update form layout and fix bug