Fixed bug in SSE version of distance calculation.