Update Project 4: Fix some bugs