Bugfix for 44dfa6f and typos in unit tests that caused it to go undetected.