fixed bug that minus index on an empty list occurs application error