Fixed semantic issues from project 2