corrected transition when lines are wrapped