fix bugs when chart has no cf