A couple of bugfixes.