A couple minor bugfixes