Two minor bug fixes