Additional fixes suggested by Simon