将以下段落中的语法错误逐个指出并进行纠正。
The teacher gave the students theres exams today. But none of the students were prepared for it, they all did poorly.
The teacher gave the students their exams today. But none of the students were prepared for it; they all did poorly. 

Explanation: 
1. "theres" should be corrected to "their"
2. There should be a semicolon or period after "it" to separate the two independent clauses. 
3. "they all did poorly" is a new sentence and should start with a capital letter.