Input selection bug fix