fixed some nasty bugs in charts