Fix semantic check issues found by the instructors