Fixes suggested by Andrew