Fixes to lab9 and lab10

Fixes to lab9 and lab10