TimSort crashfix