Fix issues pointed out in code review.