Further bugfixes/enhancements.