fixes polar angle sorting bug