fixes : inverted needle and haystack