fix bug in extended search