Changes suggested by Sebastian Harl.