Fix a bug of cart clear