Fixed small bugs in the first and third task