A couple of more bug fixes