fix edit box crashing problem and change it to button