Fixed bug with sorting points where either x or y are 0.