Fixed issues from code review