Changes suggested by #501.