Fix bug introduced in last commit, which caused unit tests to fail