Changes to reflect Ross Lawley's fix.