Do LVLMs Understand Charts? Analyzing and Correcting Factual Errors in Chart Captioning