fixed some chart buffer bugs