Fix random sort