Fixed issues from first set of comments