fix setting input value to use only visible inputs