bug fixes, improved chart functionality