Fix wrong cosine distance offset