fix chart bugs