Changed sorted distance comparator to not use the primitive unit cell by default as there were problems with the library that generates this (spglib) that were causing crashes.