Fixes suggested by Philip.