Suggestions from Mike. Fixes #1062.