Fix a bug of multiple charts