fixed bug in getValue function. Tested input with a button.