correcting multiline rules. before cleaning the solution