Fixes by Freek.