fixed bug on input