fix finding the minimum element in a rotated sorted array