Minor bugfixes and additions.