A couple of minor bug fixes