Fix bug introduced in last commit that made unit tests fail