fix exception when assigning a number to inputValue