Fix pchart bugs