Fixed inverted cosine similarity