Fix and add Euclidean distance