Take another look at the original sentence:
You wanted to fix it this way:
To add a comma and a conjunctive adverb like however between lecture and the would create an equally bad problem, a comma splice. A comma splice occurs when you have two main clauses joined with just a comma. Michael tried to pay attention to the grammar lecture is the first main clause. The only problem was is the second main clause. The spot between lecture and the needs a stronger break than a wimpy comma and a mere transition.
You might want to consult the rules for fixing comma splices and fused sentences.