Minor changes and bugfixes.