fix infinite list bug