Minor fixes to make unit tests succeed