Fix Homework 3 problems