fix bug in config form
refactor