search order bug fix