A few minor bugfixes.