Fixed a bug in the polar distance function