Updated based on PR#1191 feedback.