Fix lec7a and lec8a errors

* Fix timeline of Lec8a
* Fix a logic error of lec7a

Hope this will be helpful for someone.