fix acos on distance calc