fix a bug to miss the lower right corner from search range