fix to checking input value