Minor bugfixes and changes.