#588 check and rewrite some lines.