Fixed bugs in charting package