fix bug in processing select inputs