BUGFIX: search could break when expanding