fixed search when there are two inputs