Further bugfixes...argh.