fix silly array-like object mistake (sort => splice)