fix middle find bug