Two minor bug-fixes