fixed bugs with charts