As has been shown by previous research, students may possess various misconceptions in the area of thermal physics. In order to help them overcome misconceptions observed prior to instruction, we implemented a one-hour lecture-based intervention in their introductory thermal physics course. The intervention was held after the conventional lectures and homework sessions, and it consisted of three phases: individual working, hinting, and peer discussion. To probe students' conceptual understanding before, during, and after the intervention, use was made of a diagnostic test related to the multiphased process of an ideal gas [D. E. Meltzer, Am. J. Phys. 72, 1432(2004]. The students' conceptions were monitored by analyzing the explanations they provided and by recording the peer discussions of five voluntary pairs. The intervention helped students to realize the flaws in their explanations and increased the proportion of their scientific explanations, the increase being statistically significant in five tasks out of seven.