Fix issues mentioned in review comments.