pchart fixes

algorithm updates