fixed issues from code review