Some of the fixes suggested by Holger