Fixed small bug in drawing charts