Fixed 2 code problems

I fixed EC2 to stop processing the EBook at the end and corrected an inconsistent variable name in EC4.