fixing bug for firefox input