Initial fix for shape/chart corruption bug. #52.